import { jsx as _jsx } from "react/jsx-runtime";
import { ConfigProvider } from 'antd-v4';
import classNames from 'classnames';
import { useContext } from 'react';
import RouteContext from '../../RouteContext';
import './GridContent.less';
/**
 * This component can support contentWidth so you don't need to calculate the width
 * contentWidth=Fixed, width will is 1200
 *
 * @param props
 */

var GridContent = function GridContent(props) {
  var value = useContext(RouteContext);
  var children = props.children,
      propsContentWidth = props.contentWidth,
      propsClassName = props.className,
      style = props.style;

  var _useContext = useContext(ConfigProvider.ConfigContext),
      getPrefixCls = _useContext.getPrefixCls;

  var prefixCls = props.prefixCls || getPrefixCls('pro');
  var contentWidth = propsContentWidth || value.contentWidth;
  var className = "".concat(prefixCls, "-grid-content");
  return _jsx("div", {
    className: classNames(className, propsClassName, {
      wide: contentWidth === 'Fixed'
    }),
    style: style,
    children: _jsx("div", {
      className: "".concat(prefixCls, "-grid-content-children"),
      children: children
    })
  });
};

export default GridContent;